package com.example.mall.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 用户留存率分析表
 * </p>
 *
 * @author whale
 * @since 2025-05-16
 */
@TableName("tb_user_retention_statistics")
public class UserRetentionStatistics extends Model<UserRetentionStatistics> {

    private static final long serialVersionUID = 1L;

    /**
     * 统计记录唯一标识
     */
    @TableId("stat_id")
    private Long statId;
    /**
     * 统计日期
     */
    @TableField("stat_date")
    private Date statDate;
    /**
     * 留存周期（如1日、7日、30日）
     */
    @TableField("retention_period")
    private String retentionPeriod;
    /**
     * 新增用户数
     */
    @TableField("new_users")
    private Integer newUsers;
    /**
     * 留存用户数
     */
    @TableField("retained_users")
    private Integer retainedUsers;
    /**
     * 留存率
     */
    @TableField("retention_rate")
    private BigDecimal retentionRate;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public Long getStatId() {
        return statId;
    }

    public void setStatId(Long statId) {
        this.statId = statId;
    }

    public Date getStatDate() {
        return statDate;
    }

    public void setStatDate(Date statDate) {
        this.statDate = statDate;
    }

    public String getRetentionPeriod() {
        return retentionPeriod;
    }

    public void setRetentionPeriod(String retentionPeriod) {
        this.retentionPeriod = retentionPeriod;
    }

    public Integer getNewUsers() {
        return newUsers;
    }

    public void setNewUsers(Integer newUsers) {
        this.newUsers = newUsers;
    }

    public Integer getRetainedUsers() {
        return retainedUsers;
    }

    public void setRetainedUsers(Integer retainedUsers) {
        this.retainedUsers = retainedUsers;
    }

    public BigDecimal getRetentionRate() {
        return retentionRate;
    }

    public void setRetentionRate(BigDecimal retentionRate) {
        this.retentionRate = retentionRate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "UserRetentionStatistics{" +
        ", statId=" + statId +
        ", statDate=" + statDate +
        ", retentionPeriod=" + retentionPeriod +
        ", newUsers=" + newUsers +
        ", retainedUsers=" + retainedUsers +
        ", retentionRate=" + retentionRate +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
